'''
Created on 2018年9月10日

@author: lijie
'''
from page_element.element_base import ElementBase
class DirManagePage():
    
    class RootTree(ElementBase):
        '''root directory,鏍圭洰褰�
        '''
        def __init__(self):
            ElementBase("//span[@title='娴欐睙寤鸿鑱屼笟鎶�鏈闄�']")
            
    class RootAdd(ElementBase):
        '''root directory add,鏍圭洰褰曟柊澧�
        '''
        def __init__(self):
            ElementBase("//span[@title='娴欐睙寤鸿鑱屼笟鎶�鏈闄�']/parent::span//i[contains(@class,'add')]")
            
    class RootEdit(ElementBase):
        '''root directory edit,鏍圭洰褰曠紪杈�
        '''
        def __init__(self):
            ElementBase("//span[@title='娴欐睙寤鸿鑱屼笟鎶�鏈闄�']/parent::span//i[contains(@class,'edit')]")
            
    class NodeByTitle(ElementBase):
        def __init__(self,title):
            ElementBase("//span[@title='"+title+"']") 
            
    class NodeAddByTitle(ElementBase):
        def __init__(self,title): 
            ElementBase("//span[@title='"+title+"']/parent::span//i[contains(@class,'add')]")      
            
    class NodeEditByTitle(ElementBase):
        def __init__(self,title): 
            ElementBase("//span[@title='"+title+"']/parent::span//i[contains(@class,'edit')]")   
            
    class NodeDelByTitle(ElementBase):
        def __init__(self,title): 
            ElementBase("//span[@title='"+title+"']/parent::span//i[contains(@class,'delete')]")   

    class LblDirName(ElementBase):
        def __init__(self):
            ElementBase("//label[.='鐩綍鍚嶇О:']/parent::div//span")
    
    class LblDirShortName(ElementBase):
        def __init__(self):
            ElementBase("//label[.='鐩綍绠�绉�:']/parent::div//span")
            
    class LblParentDir(ElementBase):
        def __init__(self):
            ElementBase("//label[.='涓婄骇鐩綍:']/parent::div//span")
            
    class LblDirDescription(ElementBase):
        def __init__(self):
            ElementBase("//label[.='鐩綍鎻忚堪:']/parent::div//span")
            
    class LblContentByTitle(ElementBase):
        '''via title of per row get the row content,閫氳繃姣忚鏍囬鏉ヨ幏鍙栧彸杈规瘡琛岀殑鍐呭 
        '''
        def __init__(self,title):
            ElementBase("//label[.='"+title+":']/parent::div//span")
            
            
            